package es.us.lsi.daw.servicios;

import org.springframework.security.crypto.password.PasswordEncoder;

import es.us.lsi.daw.util.Util;
public class Sha1PasswordEncoder implements PasswordEncoder{

	public String encode(CharSequence rawPassword) {
		return Util.encriptarPassword(rawPassword.toString());
	}

	public boolean matches(CharSequence rawPassword, String encodedPassword) {
		return Util.encriptarPassword(rawPassword.toString()).equals(encodedPassword);
	}
	
}
